<template>
  <div class="box">
    <van-nav-bar left-arrow @click-left="onClickLeft" size="18px" color="#000"/>

    <h1>点击头像</h1>

    <h1 >上传自己的照片吧</h1>
 
    <van-uploader v-model="fileList" multiple :max-count="1" :after-read='chuan' />

    <van-button type="primary" size="large" class="btn-l" to="/myxing" >下一步</van-button>
  </div>
</template>

<script>
export default {
  name: "Myplce",
  data() {
    return {
      fileList: [],
      url:this.$store.state.plce
    };
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    chuan(e){
      console.log(1)
      console.log(e.content)
 this.$store.commit('plce',e.content)
    },
   
  
  }
};
</script>

<style scoped>
.box {
  width: 100%;
  overflow: hidden;
  padding: 160px 20px 0 20px;
  box-sizing: border-box;
  text-align: center;
}
.box h1:nth-child(2) {
  margin-bottom: 40px;
}
.van-uploader__upload{
  margin-top:20px ;
  overflow: hidden;
  border-color:#000 
}
.van-image__img{
   margin-top:20px ;
}
.box .btn-l {
  position: absolute;
  bottom: 0px;
  left: 0;
}
.van-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
}
</style>
